import type { PropType } from 'vue'

export type ProgressColor = {
  color: string
  progress: number //百分比
}

export const progressProps = {
  progress: {
    type: Number,
    required: true,
  },
  color: {
    type: [String, Array] as PropType<string | ProgressColor[]>,
    default: '#4caf50',
  },

  transitionDuration: {
    type: Number,
    default: 300, //宽度过渡时间，单位ms
  },
  colorTransitionDuration: {
    type: Number,
    default: 300, //颜色过渡时间，单位ms
  },

  // 样式相关
  height: {
    type: [String, Number],
    default: '8px', //进度条高度
  },
  containerBgColor: {
    type: [String, Array],
    default: '#f5f5f5', //进度条背景色
  },
  borderRadius: {
    type: [String, Number],
    default: '4px', //圆角大小
  },
  // 进度条样式
  striped: {
    type: Boolean,
    default: false, //是否显示条纹
  },
  animated: {
    type: Boolean,
    default: false, //是否显示动画效果 配合条纹使用
  },
}
